<template>
	<view class="content">
		<customHead
			:slideFlag="slideFlag"
			navi_background="#01cb88"
			:placeholder="true"
		>
		</customHead>
		<view class="content">
			<view class="payTop"></view>
			<view class="payBox">
				<image :src="payImg" mode="aspectFill" style="width: 200rpx;height: 200rpx;"></image>
				</image>
				<view class="successText">退款申请,已提交成功！</view>
				<view class="pay-money">
					商家通过审核后,会自动退还到您支付账户！
				</view>
				<view class="seeOrde common" v-if="id!==''" @click="Topath()">
					查看订单
				</view>
				<view class="backHome common" @click="Tohome()">
					返回首页
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { getApplicationPlugsRecommendedList} from "@/tools/request/api.js"
	import JSONBig from 'json-bigint'
	export default {
		data() {
			return {
				paytotalmoney: '',
				id: '',
				payImg: ''
			}
		},
		onLoad(e) {
			let self = this;
			self.getImg();
			self.paytotalmoney = e.money;
			self.id = JSONBig.parse(e.id).toString();
		},
		onShow() {

		},
		methods: {
			Topath(route) {
				uni.navigateTo({
					url: route
				})
			},
			Tohome() {
				uni.switchTab({
					url: '/pages/index/index'
				})
			},
			getImg() {
				let self = this;
				let data = {
					businessId: this.businessId,
					userServiceToken: this.userServiceToken
				}
				getApplicationPlugsRecommendedList(data).then(res => {
					if (res.code == 200) {
						let list = res.body;
						let url = list.filter(itm => itm.type === 'apply');
						self.payImg = url[0].activityImgUrl;
					}
				})
			}
		}
	}
</script>

<style lang="less">
	page {
		background-color: #f5f5f5;
	}

	.payTop {
		width: 100%;
		height: 240rpx;
		background-image: linear-gradient(#01cb88, #28efad, #fff);
		border-radius: 0 0 100rpx 100rpx;
	}

	.payBox {
		width: 92%;
		height: 1000rpx;
		border-radius: 20rpx;
		background-color: #fff;
		margin: 0 auto;
		margin-top: -160rpx;
		padding: 30rpx;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		align-items: center;

		.successText {
			font-size: 36rpx;
			font-weight: bold;
			color: #01cb88;
			margin: 40rpx 0;
		}

		.pay-money {
			font-size: 30rpx;
			margin: 40rpx 0 240rpx 0;
		}

		.common {
			width: 84%;
			height: 100rpx;
			border-radius: 50rpx;
			text-align: center;
			line-height: 100rpx;
			font-size: 30rpx;
		}

		.seeOrde {
			background-image: linear-gradient(to right, #01cb88, #28efad);
			color: #f5f5f5;
			margin: 0 0 40rpx 0;
		}

		.backHome {
			border: 3rpx solid #01cb88;
			color: #01cb88;
		}
	}
</style>